-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pcl] Add cuda and tools option #2775
Conversation
I found a way to workaround the CUDA problem, the codes are like following set(WITH_CUDA OFF)
if("cuda" IN_LIST FEATURES)
set(WITH_CUDA ON)
if(MSVC_VERSION GREATER 1900)
get_filename_component(CUDA_HOST_COMPILER "../../VC/bin/cl.exe" ABSOLUTE BASE_DIR "$ENV{VS140COMNTOOLS}"})
endif()
endif()
vcpkg_configure_cmake(... -DCUDA_HOST_COMPILER=${CUDA_HOST_COMPILER}) However, I found that |
-DWITH_LIBUSB=OFF | ||
-DWITH_OPENNI2=${WITH_OPENNI2} | ||
-DWITH_PCAP=${WITH_PCAP} | ||
-DWITH_PNG=OFF | ||
-DWITH_PNG=ON |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should libpng
be added as a dependency because of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be, but pcl
depends on vtk
which takes libpng
as a dependency, so adding it as a dependency is not necessary
Now pcl can be built with cuda almost successfully. The problem occured during |
Is it able to merge this branch now? |
Yep, thanks for the PR and sorry for the delay! |
With this portfile, pcl can be theoretically compiled against cuda. However, I met problems when building it with cuda like #2749. How I solved this is exactly described here at StackOverflow which was caused by CUDA cmake bug.
In addition, with current cuda version (8.0), only toolset along with VS2015 can be used to compile .cu files (while I am using VS2017). The problem is also describe in another post at StackOverflow, workarounds are mentioned in both posts. I am able to build pcl with cuda when specifying CUDA_HOST_COMPILER as the cl compiler in toolset v140. So the problem is with cuda rather than with pcl/opencv in my opinion, which could be solved or at least warned in the portfile of cuda.